package com.portal.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.portal.entity.CompanyInfo;
import com.portal.mapper.CompanyInfoMapper;
import com.portal.service.CompanyInfoService;
import org.springframework.stereotype.Service;

/**
 * 公司简介服务实现类
 */
@Service
public class CompanyInfoServiceImpl extends ServiceImpl<CompanyInfoMapper, CompanyInfo> implements CompanyInfoService {
    
    @Override
    public CompanyInfo getEnabledCompanyInfo() {
        LambdaQueryWrapper<CompanyInfo> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(true, CompanyInfo::getEnabled, true)
               .last("LIMIT 1");
        return getOne(wrapper);
    }
} 